package com.gx.smart.building.ui.repair.fragment

import com.gx.smart.base.BaseAdapter
import com.gx.smart.base.BaseMVVMRefreshFragmentV2
import com.gx.smart.building.ui.repair.viewmodel.RepairViewModel
import com.gx.smart.lib.http.api.response.WorkOrder
import com.scwang.smartrefresh.layout.api.RefreshLayout

/**
 *@author: xiaosy
 *时间: 2022/3/23
 *@Description: java类作用描述
 *@Version: 1.0
 **/
abstract class CommonFragment : BaseMVVMRefreshFragmentV2<RepairViewModel>(),
    BaseAdapter.OnItemClickListener<WorkOrder> {

    override fun getToolbarTitle(): String? {
        return ""
    }

    override fun enableToolbar(): Boolean {
        return false
    }


    override fun onBindViewModel(): Class<RepairViewModel> = RepairViewModel::class.java

    override fun onRefresh(refreshlayout: RefreshLayout) {
        super.onRefresh(refreshlayout)
        doAction()
    }

    override fun onLoadMore(refreshLayout: RefreshLayout) {
        super.onLoadMore(refreshLayout)
        doAction()
    }

    open fun doAction() {

    }
}